package com.baoyouqun.service;

import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baoyouqun.domain.CreateCmd.InvoiceRecordCreateCmd;
import com.baoyouqun.domain.Query.InvoiceRecordPageQuery;
import com.baoyouqun.domain.UpdateCmd.InvoiceRecordUpdateCmd;
import com.baoyouqun.domain.VO.InvoiceRecordVO;
import com.baoyouqun.entity.InvoiceRecord;
import jakarta.servlet.http.HttpServletResponse;

public interface InvoiceRecordService extends IService

        <InvoiceRecord> {

    /**
     * 新增并返回实体
     */
    SingleResponse<InvoiceRecordVO> create(InvoiceRecordCreateCmd cmd);

    Response update(InvoiceRecordUpdateCmd cmd);

    /**
     * 根据ID查询VO
     */
    InvoiceRecordVO selectById(String id);

    /**
     * 分页查询VO
     */
    /**
     * 条件筛选分页查询
     */
    IPage<InvoiceRecordVO> pageVo(InvoiceRecordPageQuery query);

    /**
     * 导出发票记录Excel（Hutool实现）
     */
    void exportInvoiceRecords(InvoiceRecordPageQuery query, HttpServletResponse response);

    /**
     * 更新发票开具状态（1-未开具，2-已开具）
     */
    Response updateInvoiceStatus(String id, Byte invoiceStatus);
}